package com.mpyy.dao.sales;

import com.mpyy.pojo.*;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.util.List;

/**
 * @version 1.0
 * @Descrioption SellCurrentAccountingDao 销售往来账务
 * @Author QIAO
 * @Date 2022-02-28 8:26
 */
@EnableTransactionManagement
@EnableAspectJAutoProxy
@Repository(value="sellCurrentAccountingDao")
public interface SellCurrentAccountingDao {
    /**
     * 查询销售表的最早的时间
     * @return
     */
    SaleOrder searchMortgageDataSaleOrder();

    /**
     * 查询商品退货的最早时间
     * @return
     */
    SaleReturn searchMortgageDataSaleReturn();

    /**
     * 查询往来账务的上部分表格内的数据
     * @param currentAccountingCustomers
     * @return
     */
    List<CurrentAccountingCustomers> currentAccounting(CurrentAccountingCustomers currentAccountingCustomers);

    /**
     * 单据的详细信息
     * @param saleOrderDescAndSaleReturn
     * @return
     */
    List<SaleOrderDescAndSaleReturn> detailsOfTheDocument(SaleOrderDescAndSaleReturn saleOrderDescAndSaleReturn);

    /**
     * 查询客户表的数据
     * @param customerInfo
     * @return
     */
    List<CustomerInfo> customerAllInfo(CustomerInfo customerInfo);

    /**
     * 根据销售单号删除销售订单信息
     * @param saleOrder
     * @return
     */
    int deleteSaleOrderInfo(SaleOrder saleOrder);

    /**
     * 根据销售单号删除销售订单详情信息
     * @param saleOrderDesc
     * @return
     */
    int deleteSaleOrderDescInfo(SaleOrderDesc saleOrderDesc);

    /**
     * 根据销售单号删除退货订单信息
     * @param saleReturn
     * @return
     */
    int deleteSaleReturnInfo(SaleReturn saleReturn);

    /**
     * 根据销售单号删除退货订单详情信息
     * @param saleReturnDesc
     * @return
     */
    int deleteSaleReturnDescInfo(SaleReturnDesc saleReturnDesc);

    /**
     * 查询客户消费情况数据
     * @param saleOrderDesc
     * @return
     */
    List<SaleOrderDesc> customerConsumption(SaleOrderDesc saleOrderDesc);

    /**
     * 查询客户账务信息数据
     * @param customerAccountingInformation
     * @return
     */
    List<CustomerAccountingInformation> customerAccountInformate(CustomerAccountingInformation customerAccountingInformation);

}
